package fun.eliauk.treedemo.config.mybatisplus;

import fun.eliauk.treedemo.utils.encrypt.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
//@EnableConfigurationProperties({AAA.class,})
public class MybatisPlusConfig {

    @Autowired
    private EncryptService encryptService;


    @Bean
    public EncryptTypeHandler encryptTypeHandler() {
        return new EncryptTypeHandler();
    }

    @Bean
    @ConditionalOnMissingBean(EncryptService.class)
    public EncryptService encryptService() {
        return encryptService;
    }
}
